
	<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Document</title>
  <link rel="stylesheet" type="text/css" href="../res/static/css/main.css">
  <link rel="stylesheet" type="text/css" href="../res/layui/css/layui.css">
  <script type="text/javascript" src="../res/layui/layui.js"></script>
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
  <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
</head>
<body id="list-cont">
  <div class="site-nav-bg">
    <div class="site-nav w1200">
      <p class="sn-back-home">
        <i class="layui-icon layui-icon-home"></i>
        <a href="#">首页</a>
      </p>
      <div class="sn-quick-menu">
        <div class="login"><a href="login.html">登录</a></div>
        <div class="sp-cart"><a href="shopcart.html">购物车</a></div> 
        <div class="address"><a href="address.html">个人收货地址</a></div>
        <div class="myorders"><a href="myorders.html">所有订单</a></div>
        <div class="users"><a href="users.html">个人信息</a></div>
      </div>
    </div>
  </div>


  <div class="header">
    <div class="headerLayout w1200">
      <div class="headerCon">
        <h1 class="mallLogo">
          <a href="#" title="潮流男鞋">
            <img src="/file/logo.jpg">
          </a>
        </h1>
        <div class="mallSearch">
          <form action="" class="layui-form" novalidate>
            <input type="text" name="title" required  lay-verify="required" autocomplete="off" class="layui-input" placeholder="请输入需要的商品">
            <button class="layui-btn" lay-submit lay-filter="formDemo">
                <i class="layui-icon layui-icon-search"></i>
            </button>
            <input type="hidden" name="" value="">
   
          </form>
        </div>
      </div>
    </div>
  </div>


  <div class="content">
    <div class="main-nav">
      <div class="inner-cont0">
        <div class="inner-cont1 w1200">
          <div class="inner-cont2">
            <a href="commodity.html" class="active">所有商品</a>
            <a href="buytoday.html">今日团购</a>
             <!-- <a href="information.html">母婴资讯</a> -->
            <a href="about.html">关于我们</a>
          </div>
        </div>
      </div>
    </div>
    <div class="category-con">
      <div class="category-inner-con w1500">
        <div class="category-type">
          <h3>全部分类</h3>
        </div>
        <div class="category-tab-content">
          <div class="nav-con">
            <ul class="normal-nav layui-clear">
              <li class="nav-item">
                <div class="title">跑步馆</div>
                <p><a href="#">运动系列</a><a href="#">生活系列</a><a href="#">综训系列</a></p>
                <i class="layui-icon layui-icon-right"></i>
              </li>
              <li class="nav-item">
                <div class="title">篮球馆</div>
                <p><a href="#">篮球鞋</a>
                <a href="#">底料：成型EVA+橡胶/成型EVA</a></p>
                <i class="layui-icon layui-icon-right"></i>
              </li>
              <li class="nav-item">
                <div class="title">休闲馆</div>
                <p><a href="#">帆布鞋</a><a href="#">板鞋</a></p>
                <i class="layui-icon layui-icon-right"></i>
              </li>
              <li class="nav-item">
                <div class="title">网球馆</div>
                <p><a href="#">网球</a><a href="#">网球拍</a><a href="#">背包</a></p>
                <i class="layui-icon layui-icon-right"></i>
              </li>
              <li class="nav-item">
                <div class="title">户外馆</div>
                <p><a href="#">帐篷</a><a href="#">毯子</a></p>
                <i class="layui-icon layui-icon-right"></i>
              </li>
              <li class="nav-item">
                <div class="title">服饰馆</div>
                <p><a href="#">卫衣</a><a href="#">休闲裤</a><a href="#">套装</a></p>
                <i class="layui-icon layui-icon-right"></i>
              </li>
              <li class="nav-item">
                <div class="title">儿童馆</div>
                <p><a href="#">服装</a><a href="#">帽子</a><a href="#">背包</a></p>
                <i class="layui-icon layui-icon-right"></i>
              </li>
              <li class="nav-item">
                <div class="title">女装馆</div>
                <p><a href="#">卫衣</a><a href="#">棉鞋</a><a href="#">背包</a></p>
                <i class="layui-icon layui-icon-right"></i>
              </li>
            </ul>
          </div>
        </div>
      </div>
      <div class="category-banner">
        <div class="w1200">
          <img src="/file/index4.jpg">
        </div>
      </div>
    </div>
    <div class="floors">
      <div class="sk">
        <div class="sk_inner w1200">
          <div class="sk_hd">
            <a href="javascript:;">
              <img src="../res/static/img/s_img1.jpg">
            </a>
          </div>
          <div class="sk_bd">
            <div class="layui-carousel" id="test1">
              <div id="box" carousel-item>
                
              </div>
            </div>
          </div>
        </div>    
      </div>
    </div>






    <div class="hot-recommend-con">
       <div class="hot-con1 w1200 layui-clear">
          <div class="item">
            <h4>热销推荐</h4>
            <div class="big-img">
              <a href="javascript:;"><img src="/file/203.jpg"></a>
            </div>
            <div class="small-img">
              <a href="javascript:;"><img src="/file/210.jpg" alt=""></a>
            </div>
          </div>
          <div class="item">
            <div class="top-img">
              <a href="javascript:;"><img src="/file/ql.jpg"></a>
            </div>
            <div class="bottom-img">
              <a href="javascript:;"><img src="/file/ql2.jpg"></a>
              <a class="baby-cream" href="javascript:;"><img src="/file/ql3.jpg"></a>
            </div>
          </div>
          <div class="item item1 margin0 padding0">
            <a href="javascript:;"><img src="/file/yl.jpg"></a>
            <a href="javascript:;"><img class="btm-img" src="/file/yl2.jpg"></a>
          </div>
      </div>
    </div>
    


    <div class="product-cont w1200" id="product-cont">
      <div class="product-item product-item1 layui-clear">
        <div class="left-title">
          <h4><i>1F</i></h4>
          <img src="../res/static/img/icon_gou.png">
          <h5>鸿星尔克</h5>
        </div>
        <div class="right-cont">
          <a href="javascript:;" class="top-img"><img src="/file/集1.jpg" alt=""></a>
          <div class="img-box">
            <a href="javascript:;"><img src="/file/ji2.jpg"></a>
            <a href="javascript:;"><img src="/file/ji3.jpg"></a>
            <a href="javascript:;"><img src="/file/ji4.jpg"></a>
            <a href="javascript:;"><img src="/file/ji5.jpg"></a>
            <a href="javascript:;"><img src="/file/ji6.jpg"></a>
          </div>
        </div>
      </div>
      <div class="product-item product-item2 layui-clear">
        <div class="left-title">
          <h4><i>2F</i></h4>
          <img src="../res/static/img/icon_gou.png">
          <h5>安踏</h5>
        </div>
        <div class="right-cont">
          <a href="javascript:;" class="top-img"><img src="/file/an.jpg" alt=""></a>
          <div class="img-box">
            <a href="javascript:;"><img src="/file/an1.jpg"></a>
            <a href="javascript:;"><img src="/file/an2.jpg"></a>
            <a href="javascript:;"><img src="/file/an3.jpg"></a>
            <a href="javascript:;"><img src="/file/an4.jpg"></a>
            <a href="javascript:;"><img src="/file/an5.jpg"></a>
          </div>
        </div>
      </div>
      <div class="product-item product-item3 layui-clear">
        <div class="left-title">
          <h4><i>3F</i></h4>
          <img src="../res/static/img/icon_gou.png">
          <h5>李宁</h5>
        </div>
        <div class="right-cont">
          <a href="javascript:;" class="top-img"><img src="/file/lining.jpg" alt=""></a>
          <div class="img-box">
            <a href="javascript:;"><img src="/file/lining1.jpg"></a>
            <a href="javascript:;"><img src="/file/lining2.jpg"></a>
            <a href="javascript:;"><img src="/file/lining3.jpg"></a>
            <a href="javascript:;"><img src="/file/lining4.jpg"></a>
            <a href="javascript:;"><img src="/file/lining5.jpg"></a>
          </div>
        </div>
      </div>
    </div>

    <div class="product-list-box" id="product-list-box">
      <div class="product-list-cont w1200">
        <h4>更多推荐</h4>
        <div class="product-item-box layui-clear">
          <div class="list-item">
            <a href="javascript:;"><img src="/file/z7.jpg"></a>
            <p>鸿星尔克运动鞋男秋冬跑步鞋秋季老爹鞋皮面红星旗舰官网男鞋</p>
            <span>￥100.00</span>
          </div>
          <div class="list-item">
            <a href="javascript:;"><img src="/file/z1.jpg"></a>
            <p>z1:全新演绎，鸿星尔克X粉色豹联名运动鞋</p>
            <span>￥100.00</span>
          </div>
          <div class="list-item">
            <a href="javascript:;"><img src="/file/z2.jpg"></a>
            <p>鸿星尔克童鞋气垫休闲鞋男童夏季儿童学生运动鞋_儿童鞋_左山网</p>
            <span>￥100.00</span>
          </div>
          <div class="list-item">
            <a href="javascript:;"><img src="/file/z11.jpg"></a>
            <p>联名还降价的国产好鞋！安踏-漫威联名全系列开箱_毒液</p>
            <span>￥100.00</span>
          </div>
          <div class="list-item">
            <a href="javascript:;"><img src="/file/z3.jpg"></a>
            <p>鸿星尔克男鞋冬季运动鞋男</p>
            <span>￥100.00</span>
          </div>
          <div class="list-item">
            <a href="javascript:;"><img src="/file/z4.jpg"></a>
            <p>鸿星尔克男鞋冬季运动鞋男</p>
            <span>￥100.00</span>
          </div>
          <div class="list-item">
            <a href="javascript:;"><img src="/file/z12.jpg"></a>
            <p>安踏氢跑鞋可口可乐联名透明纱款</p>
            <span>￥100.00</span>
          </div>
          <div class="list-item">
            <a href="javascript:;"><img src="/file/z5.jpg"></a>
            <p>鸿星尔克女鞋板鞋2015秋新款休闲旅游鞋运动鞋红星尔克官方旗舰店</p>
            <span>￥100.00</span>
          </div>
          <div class="list-item">
            <a href="javascript:;"><img src="/file/z6.jpg"></a>
            <p>鸿星尔克女鞋板鞋女2020新款秋季休闲鞋子小白鞋品牌运动鞋</p>
            <span>￥100.00</span>
          </div>
          <div class="list-item">
            <a href="javascript:;"><img src="/file/z13.jpg"></a>
            <p>安踏要疯4低帮实战测评,适合外场的实战篮球鞋!</p>
            <span>￥100.00</span>
          </div>
          <div class="list-item">
            <a href="javascript:;"><img src="/file/z7.jpg"></a>
            <p>鸿星尔克运动鞋男秋冬跑步鞋秋季老爹鞋皮面红星旗舰官网男鞋</p>
            <span>￥100.00</span>
          </div>
          <div class="list-item">
            <a href="javascript:;"><img src="/file/z8.jpg"></a>
            <p>鸿星尔克男鞋篮球鞋运动鞋男士2018秋季新款高帮减震球鞋耐磨正品</p>
            <span>￥100.00</span>
          </div>
          <div class="list-item">
            <a href="javascript:;"><img src="/file/z9.jpg"></a>
            <p>鸿星尔克男鞋冬季运动鞋男</p>
            <span>￥100.00</span>
          </div>
          <div class="list-item">
            <a href="javascript:;"><img src="/file/z14.jpg"></a>
            <p>篮球鞋</p>
            <span>￥100.00</span>
          </div>
          <div class="list-item">
            <a href="javascript:;"><img src="/file/z10.jpg"></a>
            <p>鸿星尔克 男鞋运动鞋男新款休闲鞋跑步鞋男鞋复古潮流老爹鞋</p>
            <span>￥100.00</span>
          </div>
          <div class="list-item">
            <a href="javascript:;"><img src="/file/z6.jpg"></a>
            <p>鸿星尔克女鞋板鞋女2020新款秋季休闲鞋子小白鞋品牌运动鞋</p>
            <span>￥100.00</span>
          </div>
          <div class="list-item">
            <a href="javascript:;"><img src="/file/z4.jpg"></a>
            <p>鸿星尔克男鞋冬季运动鞋男</p>
            <span>￥100.00</span>
          </div>
          <div class="list-item">
            <a href="javascript:;"><img src="/file/z15.jpg"></a>
            <p>安踏板鞋</p>
            <span>￥100.00</span>
          </div>
          <div class="list-item">
            <a href="javascript:;"><img src="/file/z11.jpg"></a>
            <p>联名还降价的国产好鞋！安踏-漫威联名全系列开箱_毒液</p>
            <span>￥100.00</span>
          </div>
          <div class="list-item">
            <a href="javascript:;"><img src="/file/z4.jpg"></a>
            <p>鸿星尔克男鞋冬季运动鞋男</p>
            <span>￥100.00</span>
          </div>
          <div class="list-item">
            <a href="javascript:;"><img src="/file/z7.jpg"></a>
            <p>鸿星尔克运动鞋男秋冬跑步鞋秋季老爹鞋皮面红星旗舰官网男鞋</p>
            <span>￥100.00</span>
          </div>
          <div class="list-item">
            <a href="javascript:;"><img src="/file/z6.jpg"></a>
            <p>鸿星尔克女鞋板鞋女2020新款秋季休闲鞋子小白鞋品牌运动鞋</p>
            <span>￥100.00</span>
          </div>
          <div class="list-item">
            <a href="javascript:;"><img src="/file/z5.jpg"></a>
            <p>鸿星尔克女鞋板鞋2015秋新款休闲旅游鞋运动鞋红星尔克官方旗舰店</p>
            <span>￥100.00</span>
          </div>
          <div class="list-item">
            <a href="javascript:;"><img src="/file/z12.jpg"></a>
            <p>安踏氢跑鞋可口可乐联名透明纱款</p>
            <span>￥100.00</span>
          </div>
          <div class="list-item">
            <a href="javascript:;"><img src="/file/z14.jpg"></a>
            <p>篮球鞋</p>
            <span>￥100.00</span>
          </div>
          <div class="list-item">
            <a href="javascript:;"><img src="/file/z1.jpg"></a>
            <p>全新演绎，鸿星尔克X粉色豹联名运动鞋</p>
            <span>￥100.00</span>
          </div>
          <div class="list-item">
            <a href="javascript:;"><img src="/file/z3.jpg"></a>
            <p>鸿星尔克男鞋冬季运动鞋男</p>
            <span>￥100.00</span>
          </div>
        </div>
      </div>
    </div>
  </div>

  <div class="footer">
    <div class="ng-promise-box">
      <div class="ng-promise w1200">
        <p class="text">
          <a class="icon1" href="javascript:;">7天无理由退换货</a>
          <a class="icon2" href="javascript:;">满99元全场免邮</a>
          <a class="icon3" style="margin-right: 0" href="javascript:;">100%品质保证</a>
        </p>
      </div>
    </div>
    <div class="mod_help w1200">                                     
      <p>
        <a href="javascript:;">关于我们</a>
        <span>|</span>
        <a href="javascript:;">帮助中心</a>
        <span>|</span>
        <a href="javascript:;">售后服务</a>
        <span>|</span>
        <a href="javascript:;">母婴资讯</a>
        <span>|</span>
        <a href="javascript:;">关于货源</a>
      </p>
      <p class="coty">母婴商城版权所有 &copy; 2012-2020</p>
    </div>
  </div>
  <script type="text/javascript">

layui.config({
    base: '../res/static/js/util/' //你存放新模块的目录，注意，不是layui的模块目录
  }).use(['mm','carousel','jquery'],function(){
      var carousel = layui.carousel,
     mm = layui.mm;
      var $=layui.jquery;
      
      //查询今日推荐商品数据
      $.post(
    		  "../../product/findToday.do",
    		  function(res) {
				//console.log(res)
				//解决标题过长的问题
				for (var i = 0; i < res.length; i++) {
					if (res[i].pname.length>12) {
						res[i].pname=res[i].pname.substring(0,12)+"...";
					}
				}
				
				var box=$("#box");
				var boxone=$('<div class="item-box"></div>');			
					for (var i = 0; i < 4; i++) {
						var item=$('<div class="item"><a href="javascript:toDetails('+res[i].id+');"><img src="/file/'+res[i].url+'"></a><div class="title">'+res[i].pname+'</div><div class="price"><span>'+res[i].unitPrice+'</span><del>'+res[i].unitPrice*2+'</del></div></div>');
					    boxone.append(item);
					}
					
				
				//if(res.length>4){//超过4个需要两个box
				//	var boxtwo=$('<div class="item-box"></div>');
					//for (var i = 4; i <res.length;i++) {
					//	var item=$('<div class="item"><a href="javascript:toDetails('+res[i].id+');"><img src="/file/'+res[i].url+'"></a><div class="title">'+res[i].pname+'</div><div class="price"><span>'+res[i].unitPrice+'</span><del>'+res[i].unitPrice*2+'</del></div></div>');
					 //   boxone.append(item);
					//}
					
				//}
				box.append(boxone);
				//box.append(boxtwo);
				carousel.render(option);//渲染
			},"json"
    		  
 
      );
      
      
      
      
      
      
     var option = {
        elem: '#test1'
        ,width: '100%' //设置容器宽度
        ,arrow: 'always'
        ,height:'298' 
        ,indicator:'none'
      }
      carousel.render(option);
      // 模版引擎导入
     // var ins = carousel.render(option);
     // var html = demo.innerHTML;
     // var listCont = document.getElementById('list-cont');
     // // console.log(layui.router("#/about.html"))
     //  mm.request({
     //    url: '../json/index.json',
     //    success : function(res){
     //      console.log(res)
     //      listCont.innerHTML = mm.renderHtml(html,res)
     //      ins.reload(option);
     //    },
     //    error: function(res){
     //      console.log(res);
     //    }
     //  })
    

});

//定义一个toDetails方法
function toDetails(id) {
	//console.log(id)
	location.href="details.html?id="+id;
}
  </script>
</body>
</html>